package com.huawei.appmarket.service.store.awk.card;

import android.content.Context;
import android.graphics.Bitmap;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.huawei.appgallery.foundation.card.base.card.BaseDistCard;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.framework.widget.CustomActionBar;
import com.huawei.appmarket.service.store.awk.bean.SubstanceInfoBean;
import o.azb;
import o.cgz;
import o.Logger;
import o.eqx;
import o.eqz;
import o.erq;
import o.ewm.j;

public class ImmersiveHeadCombineCard extends BaseDistCard implements eqz {
    private TextView ʼ;
    private TextView ʽ;
    private ImageView ˋ;
    private TextView ॱॱ;
    private String ᐝ;

    public ImmersiveHeadCombineCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        this.ˋ = (ImageView) view.findViewById(j.ˊꜝ);
        this.ʼ = (TextView) view.findViewById(j.ˋי);
        this.ʽ = (TextView) view.findViewById(j.ˊⁱ);
        this.ॱॱ = (TextView) view.findViewById(j.ˊᶫ);
        azb.ॱ(this.ॱॱ);
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        SubstanceInfoBean substanceInfoBean = (SubstanceInfoBean) cardBean;
        if (substanceInfoBean.ʻˊ() != null) {
            this.ʼ.setText(substanceInfoBean.ʻˊ());
        }
        if (substanceInfoBean.ʻᐝ() != null) {
            this.ʽ.setText(substanceInfoBean.ʻᐝ());
        }
        if (substanceInfoBean.ʼˋ() != null) {
            this.ॱॱ.setVisibility(0);
            this.ॱॱ.setText(substanceInfoBean.ʼˋ());
        }
        this.ᐝ = substanceInfoBean.ʾॱ();
        eqx.ˎ(this.ˋ, substanceInfoBean.ʼˊ(), "image_default_icon", this, true);
    }

    public void ॱ(Bitmap bitmap) {
        if (bitmap != null) {
            try {
                CustomActionBar.ˎ(this.ˋ.getContext(), erq.ॱ(this.ᐝ, bitmap), this.ˋ.getHeight());
            } catch (IllegalStateException e) {
                Logger.e("ImmersiveHeadVideoCard", e.toString());
            }
        }
    }
}
